from typing import List


class Solution:
    def moveZeroes(self, nums: List[int]) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        flag = 0
        for i in range(len(nums)):
            if nums[i] != 0:
                if i != flag:
                    nums[i], nums[flag] = nums[flag], nums[i]
                flag = flag + 1


array = [0, 1, 0, 3, 12]
Solution().moveZeroes(array)
print(array)
